Development and maintenance of software applications are critical issues in modern data processing systems. For this purpose, several technologies have been proposed in the last years to facilitate the reuse of software code and the integration of preexisting solutions.
Particularly, in a component-based infrastructure the software applications are built combining program blocks (called components). A component consists of a self-describing object providing a well-specified set of publicly available services; in this way, multiple components can run together and each of them is able to understand and exploit the capabilities of the other components.
A typical example of a component-based infrastructure is the one conforming to the Component Object Model (COM) specification, as described at “http://msdn.microsoft.com/library/”. In the COM specification, each component concretely implements predefined interfaces (consisting of abstract definitions of the supported services). The COM specification provides a versatile and completely language-independent infrastructure, which easily fits into an object-oriented program design.
Each component conforming to the COM specification is instantiated by a client requiring its services; for this purpose, the client calls a corresponding method (being exposed by a basic interface). The component can be instantiated in the process of the client (in-process), so as to run in the same environment context. Alternatively, the component can be instantiated in a different process (out-of-process) by means of a system service; in this case, the component inherits the properties of the context of the system service. However, in both cases the client cannot alter the setting of the context wherein the component runs.
The COM specification also allows selecting a desired instantiation mode for the component; the instantiation mode is chosen from a list of options that are available for the component (such as in-process or out-of-process). Even in this case, the client is bound to a set of predefined contexts.
Therefore, the client cannot instantiate the desired component in a custom context that is defined at run-time.
In other words, no support is available in the prior art for controlling the context of the components dynamically.
This problem is particularly acute for in-process components that are provided by third parties. Indeed, those components can only run in the same process of the client; as a consequence, it is not possible to customize their context in any way.